package elementalgit;
//dan download

import java.awt.Image;
import java.awt.Toolkit;


public class MenuScreen extends javax.swing.JFrame {

    public MenuScreen() {
        initComponents();
    }
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLayeredPane1 = new javax.swing.JLayeredPane();
        playButton = new javax.swing.JButton();
        exitButton = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        menuImage = new javax.swing.JLabel();
        optionButton = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Elemental-Git");
        setResizable(false);

        playButton.setBackground(new java.awt.Color(255, 255, 0));
        playButton.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
        playButton.setText("Play");
        playButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                playButtonMouseClicked(evt);
            }
        });
        playButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                playButtonActionPerformed(evt);
            }
        });
        playButton.setBounds(100, 190, 130, 39);
        jLayeredPane1.add(playButton, javax.swing.JLayeredPane.DEFAULT_LAYER);

        exitButton.setBackground(new java.awt.Color(255, 255, 0));
        exitButton.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
        exitButton.setText("Exit");
        exitButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                exitButtonMouseClicked(evt);
            }
        });
        exitButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                exitButtonActionPerformed(evt);
            }
        });
        exitButton.setBounds(190, 290, 90, 39);
        jLayeredPane1.add(exitButton, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel1.setFont(new java.awt.Font("Copperplate Gothic Light", 0, 48)); // NOI18N
        jLabel1.setText("Elemental-Git");
        jLabel1.setBounds(200, 380, 370, 62);
        jLayeredPane1.add(jLabel1, javax.swing.JLayeredPane.DEFAULT_LAYER);

        menuImage.setIcon(new javax.swing.ImageIcon(getClass().getResource("/elementalgit/chemistryCatImage.jpg"))); // NOI18N
        menuImage.setBounds(430, 100, 200, 220);
        jLayeredPane1.add(menuImage, javax.swing.JLayeredPane.DEFAULT_LAYER);

        optionButton.setBackground(new java.awt.Color(255, 255, 0));
        optionButton.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
        optionButton.setText("Options");
        optionButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                optionButtonMouseClicked(evt);
            }
        });
        optionButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                optionButtonActionPerformed(evt);
            }
        });
        optionButton.setBounds(260, 190, 130, 40);
        jLayeredPane1.add(optionButton, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jButton2.setBackground(new java.awt.Color(255, 255, 0));
        jButton2.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
        jButton2.setText("How to Play");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });
        jButton2.setBounds(140, 240, 190, 40);
        jLayeredPane1.add(jButton2, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/elementalgit/tg.JPG"))); // NOI18N
        jLabel2.setBounds(30, 60, 27, 270);
        jLayeredPane1.add(jLabel2, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/elementalgit/table bckgrnd.JPG"))); // NOI18N
        jLabel3.setBounds(0, 0, 680, 460);
        jLayeredPane1.add(jLabel3, javax.swing.JLayeredPane.DEFAULT_LAYER);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLayeredPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 680, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLayeredPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 460, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void playButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_playButtonActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_playButtonActionPerformed

    private void playButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_playButtonMouseClicked
       GameModes gameWin = new GameModes();
       gameWin.setLocationRelativeTo(null);
       gameWin.setVisible(true);
        this.dispose();
        
    }//GEN-LAST:event_playButtonMouseClicked

    private void exitButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_exitButtonMouseClicked
        this.setVisible(false);
        this.dispose();
        
    }//GEN-LAST:event_exitButtonMouseClicked

    private void exitButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exitButtonActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_exitButtonActionPerformed

    private void optionButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_optionButtonActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_optionButtonActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        directions dctns = new directions();
        dctns.setLocationRelativeTo(null);
        dctns.setVisible(true);
    }//GEN-LAST:event_jButton2ActionPerformed

    private void optionButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_optionButtonMouseClicked
        options.init();
    }//GEN-LAST:event_optionButtonMouseClicked

    /**
     * @param args the command line arguments
     */
    public static void open() {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                MenuScreen menu1 = new MenuScreen();
                menu1.setLocationRelativeTo(null);
                Image im = Toolkit.getDefaultToolkit().getImage("orange.png");
       
                menu1.setIconImage(im);
                menu1.setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton exitButton;
    private javax.swing.JButton jButton2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLayeredPane jLayeredPane1;
    private javax.swing.JLabel menuImage;
    private javax.swing.JButton optionButton;
    private javax.swing.JButton playButton;
    // End of variables declaration//GEN-END:variables
}
